package com.ytzl.controller;

import com.ytzl.pojo.ItripUser;
import com.ytzl.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: init
 * @Date: 2021/7/15 16:28
 * @Description:
 */
@RestController
public class DemoController {

    @Autowired
    private UserService userService;

    @RequestMapping("/{id}")
    public ItripUser queryUserById(@PathVariable("id") long id){
        return userService.queryById(id);
    }
    @RequestMapping("/index")
    public String index(){
        return "index";
    }
}
